﻿<template>
  <a-modal
    title="编辑诊疗项目维护"
    :width="900"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @ok="handleSubmit"
    @cancel="handleCancel">
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-form-item label="系统分类 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入系统分类 " v-decorator="['sysClass', {rules: [{required: true, message: '请输入系统分类 ！'}]}]" />
        </a-form-item>
        <a-form-item label="编码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入编码 " v-decorator="['itemCode', {rules: [{required: true, message: '请输入编码 ！'}]}]" />
        </a-form-item>
        <a-form-item label="名称 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入名称 " v-decorator="['itemName', {rules: [{required: true, message: '请输入名称 ！'}]}]" />
        </a-form-item>
        <a-form-item label="项目id " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入项目id " v-decorator="['itemId', {rules: [{required: true, message: '请输入项目id ！'}]}]" />
        </a-form-item>
        <a-form-item label="规格 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入规格 " v-decorator="['itemSpec', {rules: [{required: true, message: '请输入规格 ！'}]}]" />
        </a-form-item>
        <a-form-item label="单位 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入单位 " v-decorator="['units', {rules: [{required: true, message: '请输入单位 ！'}]}]" />
        </a-form-item>
        <a-form-item label="单价 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入单价 " v-decorator="['itemPrice', {rules: [{required: true, message: '请输入单价 ！'}]}]" />
        </a-form-item>
        <a-form-item label="拼音码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入拼音码 " v-decorator="['inputCode']" />
        </a-form-item>
        <a-form-item label="五笔码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入五笔码 " v-decorator="['inputCodeWb']" />
        </a-form-item>
        <a-form-item label="门诊发票分类 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择门诊发票分类 " v-decorator="['classOnOutpRcpt', {rules: [{ required: true, message: '请选择门诊发票分类 ！' }]}]">
            <a-select-option v-for="(item,index) in classOnOutpRcptData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="住院发票分类 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择住院发票分类 " v-decorator="['classOnInpRcpt', {rules: [{ required: true, message: '请选择住院发票分类 ！' }]}]">
            <a-select-option v-for="(item,index) in classOnInpRcptData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="经验管理分类 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择经验管理分类 " v-decorator="['classOnReckoning', {rules: [{ required: true, message: '请选择经验管理分类 ！' }]}]">
            <a-select-option v-for="(item,index) in classOnReckoningData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="财务分类 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择财务分类 " v-decorator="['subjCode', {rules: [{ required: true, message: '请选择财务分类 ！' }]}]">
            <a-select-option v-for="(item,index) in subjCodeData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="病案分类 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择病案分类 " v-decorator="['classOnMr', {rules: [{ required: true, message: '请选择病案分类 ！' }]}]">
            <a-select-option v-for="(item,index) in classOnMrData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="英文编码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入英文编码 " v-decorator="['forignCode']" />
        </a-form-item>
        <a-form-item label="是否打折 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择是否打折 " v-decorator="['feeTypeMask', {rules: [{ required: true, message: '请选择是否打折 ！' }]}]">
            <a-select-option v-for="(item,index) in feeTypeMaskData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="操作员 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入操作员 " v-decorator="['operator']" />
        </a-form-item>
        <a-form-item label="录入日期 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择录入日期 " v-decorator="['enterDate']" @change="onChangeenterDate"/>
        </a-form-item>
        <a-form-item label="执行科室编码 " :labelCol="labelCol" :wrapperCol="wrapperCol">
          <a-select style="width: 100%" placeholder="请选择执行科室编码 " v-decorator="['performedByCode', {rules: [{ required: true, message: '请选择执行科室编码 ！' }]}]">
            <a-select-option v-for="(item,index) in performedByCodeData" :key="index" :value="item.code">{{ item.name }}</a-select-option>
          </a-select>
        </a-form-item>
        <a-form-item label="执行科室名称 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入执行科室名称 " v-decorator="['performedByName']" />
        </a-form-item>
        <a-form-item label="说明 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入说明 " v-decorator="['memo']" />
        </a-form-item>
        <a-form-item label="备注1 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入备注1 " v-decorator="['back1']" />
        </a-form-item>
        <a-form-item label="备注2 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入备注2 " v-decorator="['back2']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['nhFylb']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['back3']" />
        </a-form-item>
        <a-form-item label="税率 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入税率 " v-decorator="['siRate']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRemark5']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRemark4']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRemark3']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRemark2']" />
        </a-form-item>
        <a-form-item label="生产方式统计分类 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入生产方式统计分类 " v-decorator="['siRemark1']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siClassNo1']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siClassNo2']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siClassNo3']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siClassNo4']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siClassNo5']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRate1']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRate2']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRate3']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRate4']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siRate5']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel1']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel2']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel3']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel4']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siLevel5']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode1']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode2']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode3']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode4']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['siCode5']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['itemNameYb']" />
        </a-form-item>
        <a-form-item label="国家医保编码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入国家医保编码 " v-decorator="['nationCodeYb']" />
        </a-form-item>
        <a-form-item label="类别 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入类别 " v-decorator="['lb']" />
        </a-form-item>
        <a-form-item label="项目标志 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入项目标志 " v-decorator="['itemFlag']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['itemPriceSz']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['rebate']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['itemYbMemo']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['lmtUsedFlag']" />
        </a-form-item>
        <a-form-item label="外检标志 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入外检标志 " v-decorator="['outside']" />
        </a-form-item>
        <a-form-item label="外检单位编码 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入外检单位编码 " v-decorator="['outsideHospitalCode']" />
        </a-form-item>
        <a-form-item label="" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入" v-decorator="['isCheckObject']" />
        </a-form-item>
        <a-form-item label="注册备案号 " :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入注册备案号 " v-decorator="['zcbah']" />
        </a-form-item>
        <a-form-item v-show="false"><a-input v-decorator="['iD']" /></a-form-item>
        <a-form-item label="创建时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择创建时间" v-decorator="['cREATE_DATE']" @change="onChangecREATE_DATE"/>
        </a-form-item>
        <a-form-item label="创建者Id" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入创建者Id" v-decorator="['cREATE_USER_ID']" />
        </a-form-item>
        <a-form-item label="创建者名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入创建者名称" v-decorator="['cREATE_USER_NAME']" />
        </a-form-item>
        <a-form-item label="更新时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择更新时间" v-decorator="['mODIFY_DATE']" @change="onChangemODIFY_DATE"/>
        </a-form-item>
        <a-form-item label="修改者Id" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入修改者Id" v-decorator="['mODIFY_USER_ID']" />
        </a-form-item>
        <a-form-item label="修改者名称" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入修改者名称" v-decorator="['mODIFY_USER_NAME']" />
        </a-form-item>
        <a-form-item label="删除时间" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-date-picker style="width: 100%" placeholder="请选择删除时间" v-decorator="['dELETE_DATE']" @change="onChangedELETE_DATE"/>
        </a-form-item>
        <a-form-item label="删除者ID" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入删除者ID" v-decorator="['dELETE_USER_ID']" />
        </a-form-item>
        <a-form-item label="删除者姓名" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-input placeholder="请输入删除者姓名" v-decorator="['dELETE_USER_NAME']" />
        </a-form-item>
        <a-form-item label="软删除标记" :labelCol="labelCol" :wrapperCol="wrapperCol" has-feedback>
          <a-switch v-decorator="['iS_DELETED', { valuePropName: 'checked' }]" />
        </a-form-item>
      </a-form>
    </a-spin>
  </a-modal>
</template>

<script>
  import moment from 'moment'
  import {
    PriceListEdit
  } from '@/api/modular/main/PriceListManage'
  export default {
    data () {
      return {
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 15 }
        },
        classOnOutpRcptData: [],
        classOnInpRcptData: [],
        classOnReckoningData: [],
        subjCodeData: [],
        classOnMrData: [],
        feeTypeMaskData: [],
        enterDateDateString: '',
        performedByCodeData: [],
        cREATE_DATEDateString: '',
        mODIFY_DATEDateString: '',
        dELETE_DATEDateString: '',
        visible: false,
        confirmLoading: false,
        form: this.$form.createForm(this)
      }
    },
    methods: {
      moment,
      // 初始化方法
      edit (record) {
        this.visible = true
        const classOnOutpRcptOption = this.$options
        this.classOnOutpRcptData = classOnOutpRcptOption.filters['dictData']('')
        const classOnInpRcptOption = this.$options
        this.classOnInpRcptData = classOnInpRcptOption.filters['dictData']('')
        const classOnReckoningOption = this.$options
        this.classOnReckoningData = classOnReckoningOption.filters['dictData']('')
        const subjCodeOption = this.$options
        this.subjCodeData = subjCodeOption.filters['dictData']('')
        const classOnMrOption = this.$options
        this.classOnMrData = classOnMrOption.filters['dictData']('')
        const feeTypeMaskOption = this.$options
        this.feeTypeMaskData = feeTypeMaskOption.filters['dictData']('')
        const performedByCodeOption = this.$options
        this.performedByCodeData = performedByCodeOption.filters['dictData']('')
        setTimeout(() => {
          this.form.setFieldsValue(
            {
              iD: record.iD,
              sysClass: record.sysClass,
              itemCode: record.itemCode,
              itemName: record.itemName,
              itemId: record.itemId,
              itemSpec: record.itemSpec,
              units: record.units,
              itemPrice: record.itemPrice,
              inputCode: record.inputCode,
              inputCodeWb: record.inputCodeWb,
              classOnOutpRcpt: record.classOnOutpRcpt,
              classOnInpRcpt: record.classOnInpRcpt,
              classOnReckoning: record.classOnReckoning,
              subjCode: record.subjCode,
              classOnMr: record.classOnMr,
              forignCode: record.forignCode,
              feeTypeMask: record.feeTypeMask,
              operator: record.operator,
              performedByCode: record.performedByCode,
              performedByName: record.performedByName,
              memo: record.memo,
              back1: record.back1,
              back2: record.back2,
              siLevel: record.siLevel,
              siCode: record.siCode,
              nhFylb: record.nhFylb,
              back3: record.back3,
              siRate: record.siRate,
              siRemark5: record.siRemark5,
              siRemark4: record.siRemark4,
              siRemark3: record.siRemark3,
              siRemark2: record.siRemark2,
              siRemark1: record.siRemark1,
              siClassNo1: record.siClassNo1,
              siClassNo2: record.siClassNo2,
              siClassNo3: record.siClassNo3,
              siClassNo4: record.siClassNo4,
              siClassNo5: record.siClassNo5,
              siRate1: record.siRate1,
              siRate2: record.siRate2,
              siRate3: record.siRate3,
              siRate4: record.siRate4,
              siRate5: record.siRate5,
              siLevel1: record.siLevel1,
              siLevel2: record.siLevel2,
              siLevel3: record.siLevel3,
              siLevel4: record.siLevel4,
              siLevel5: record.siLevel5,
              siCode1: record.siCode1,
              siCode2: record.siCode2,
              siCode3: record.siCode3,
              siCode4: record.siCode4,
              siCode5: record.siCode5,
              itemNameYb: record.itemNameYb,
              nationCodeYb: record.nationCodeYb,
              lb: record.lb,
              itemFlag: record.itemFlag,
              itemPriceSz: record.itemPriceSz,
              rebate: record.rebate,
              itemYbMemo: record.itemYbMemo,
              lmtUsedFlag: record.lmtUsedFlag,
              outside: record.outside,
              outsideHospitalCode: record.outsideHospitalCode,
              isCheckObject: record.isCheckObject,
              zcbah: record.zcbah,
              cREATE_USER_ID: record.cREATE_USER_ID,
              cREATE_USER_NAME: record.cREATE_USER_NAME,
              mODIFY_USER_ID: record.mODIFY_USER_ID,
              mODIFY_USER_NAME: record.mODIFY_USER_NAME,
              dELETE_USER_ID: record.dELETE_USER_ID,
              dELETE_USER_NAME: record.dELETE_USER_NAME,
              iS_DELETED: record.iS_DELETED
            }
          )
        }, 100)
        this.form.getFieldDecorator('enterDate', { initialValue: moment(record.enterDate, 'YYYY-MM-DD') })
        this.enterDateDateString = moment(record.enterDate).format('YYYY-MM-DD')
        this.form.getFieldDecorator('cREATE_DATE', { initialValue: moment(record.cREATE_DATE, 'YYYY-MM-DD') })
        this.cREATE_DATEDateString = moment(record.cREATE_DATE).format('YYYY-MM-DD')
        this.form.getFieldDecorator('mODIFY_DATE', { initialValue: moment(record.mODIFY_DATE, 'YYYY-MM-DD') })
        this.mODIFY_DATEDateString = moment(record.mODIFY_DATE).format('YYYY-MM-DD')
        this.form.getFieldDecorator('dELETE_DATE', { initialValue: moment(record.dELETE_DATE, 'YYYY-MM-DD') })
        this.dELETE_DATEDateString = moment(record.dELETE_DATE).format('YYYY-MM-DD')
      },
      handleSubmit () {
        const { form: { validateFields } } = this
        this.confirmLoading = true
        validateFields((errors, values) => {
          if (!errors) {
            for (const key in values) {
              if (typeof (values[key]) === 'object') {
                values[key] = JSON.stringify(values[key])
              }
            }
            values.enterDate = this.enterDateDateString
            values.cREATE_DATE = this.cREATE_DATEDateString
            values.mODIFY_DATE = this.mODIFY_DATEDateString
            values.dELETE_DATE = this.dELETE_DATEDateString
            PriceListEdit(values).then((res) => {
              if (res.success) {
                this.$message.success('编辑成功')
                this.confirmLoading = false
                this.$emit('ok', values)
                this.handleCancel()
              } else {
                this.$message.error('编辑失败：' + JSON.stringify(res.message))
              }
            }).finally((res) => {
              this.confirmLoading = false
            })
          } else {
            this.confirmLoading = false
          }
        })
      },
      onChangeenterDate(date, dateString) {
        this.enterDateDateString = dateString
      },
      onChangecREATE_DATE(date, dateString) {
        this.cREATE_DATEDateString = dateString
      },
      onChangemODIFY_DATE(date, dateString) {
        this.mODIFY_DATEDateString = dateString
      },
      onChangedELETE_DATE(date, dateString) {
        this.dELETE_DATEDateString = dateString
      },
      handleCancel () {
        this.form.resetFields()
        this.visible = false
      }
    }
  }
</script>
